//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================
#ifndef __CALIBRATE_H__
#define __CALIBRATE_H__

//#define _DBGCALIBRATE

typedef struct {
    int x;//Raw Coordinate
    int y;//Raw
    int X;//LCD Point
    int Y;
}RefPoint;

typedef struct {
    int x1, y1;
    int X1, Y1;
    int x2, y2;
    int X2, Y2;
}CalibrationInfo;

void GetDisplayPoint(int x, int y, int *pX, int *pY);
int SetCalibrationMatrix(int n, RefPoint P[]);

#define x1  g_Cali.x1
#define y1  g_Cali.y1
#define X1  g_Cali.X1
#define Y1  g_Cali.Y1
#define x2  g_Cali.x2
#define y2  g_Cali.y2
#define X2  g_Cali.X2
#define Y2  g_Cali.Y2

extern CalibrationInfo g_Cali;

#endif//__CALIBRATE_H__
